Boduka Codes taken from Nov, 2000


WhirlWind - Since then Whirlwind has been Upgraded


> more whirlwind.c
/*
 * Rampage command
 *
 * Date         Creator         Comment
 * ------------ --------------- --------------------------------------
 * -Unknown-    Phantom         Converted from kill command in player.c
 *  2 Mar 95    Morgoth         Made external
 * 26 Apr 96    Agamemnon       Fixed bug with multiple rampages
 * 29 Apr 96    Agamemnon       Rewrote from scratch to take advantage
 *                              of the new "attack_cmd" inheritable
 * 22 Dec 97    Hellbent        Typo-fixed the setup messages.
 * 18 Feb 98    Aurora          Changed set_att_mess to be $targ$ instead 
 *                              of you in the second argument.
 *                              Fighters complained that the initial
 *                              room message made people think they were
 *                              attacking them.
 * 20 Feb 98    Darsis          Lower level to get Rampage due to change
 *                              to max level (down by 20%)
 * 17 Jan 99    Darsis          100 gps, lowered damage cap
 */

#include 
inherit CMD_BASE;
inherit "/cmds/guild/attack_cmd.c";
#define MIN_LEVEL 15
#define GP_COST 100
#define SKILL "fighting.combat.melee.unarmed"
#define MIN_BONUS 100
#define MAX_BONUS 450

int query_valid_use( object ob )
{
    if( !ob->query_property( "com_list" ) || 
      ob->query_property( "com_list" )["second"]
      != "whirlwind" ) return 0;
    return 1;
}
int help( object me )
{
    mixed ob;

    ob = me->query_holding();
    ob = (ob && sizeof(ob))? ob[0] : 0;
    tell_object( me, 
    "Skill:          Whirlwind\n"
    "Usage:          whirlwind \n"
    "Minimum Level:  "+MIN_LEVEL+" (overall)\n"
    "GP Cost:        100\n"
    "Current Rating: "+ querySDString(query_perc_mult
      (me, ob), MAX_BONUS)+"\n"
    "Description:\n"
    " Whirlwind is a technique handed down generation to generation"
    " of monks dealing with a series of rapid fire attacks"
    " upon a group of opponents.\n" );
    return 1;
}
protected int cmd( class command cmd )
{

    if( !query_valid_use( cmd->user ) ) return 0;

    if( cmd->arg == "help" ) return help( cmd->user );
    if ( interactive( cmd->user ) ) 
        cmd->arg = cmd->user->expand_nickname( cmd->arg );
    ::do_attack( cmd->user, cmd->arg );
    return 1;
}

varargs int query_perc_mult( object me, object wpn ){
    return (me->query_skill_bonus("fighting.combat.melee.unarmed" ) * 4 / 5);
}

int query_gp_cost( object me ) {
    return GP_COST;
}

void create(){
    ::create();
    set_cmd_name("whirlwind");
    set_delay(2);
    set_num_att(2);
    set_min_level( MIN_LEVEL );
    guildonly("budoka");
    set_invis_bonus(50);
    set_range( MIN_BONUS, MAX_BONUS );
    set_multi_attacks( 1 );
    set_use_hands(1);
    set_allowed_weapon_type(SKILL);

    set_fail_mess( ({
        "You're already $cmd$ing someone!",
        "You can't seem to find your target.",
        "You cannot $cmd$ $targ$.",
        "What do you expect to $cmd$ $targ$ with?",
        "You are far too exhausted to $cmd$ $targ$",
        "You are not a Budoka and cannot use this ability!",
       "You are of insufficient level to execute the Whirlwind."
      }) );

    set_prep_mess( ({
        "You prepare to $cmd$ about the place."
      }) );

    set_att_mess( ({
        "You $cmd$ $targ$.",
        "$me$ $cmd$s $targ$.",
        "$me$ $cmd$s $targ$."
      }) );
}


void dest_me() {
    cmd::dest_me();
}










1